fix(stargate): enforce protocol input and header contracts - #1818
barrygreengus wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (19)
💤 Files with no reviewable changes (5)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe PR simplifies proto and Cap’n Proto build integration. It centralizes connection-aware HTTP header filtering, updates forwarding paths, improves QUIC address validation, and adjusts protocol deserialization tests. ChangesBuild pipeline simplification
Transport behavior updates
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The protocol, forwarding, build, and address-validation changes are ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.98.0)Clippy execution failed Comment |
a8c084d to
0436af5
Compare
🛡️ CodeQL Analysis🚨 Found 5 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-09-11 21:23:19 UTC | Commit: 0436af5 |
Accept IPv6 tunnel addresses and owned JSON values, filter Connection-nominated fields, and simplify schema generation while retaining generated API tests. Refs: #1817
Regenerate the Bazel dependency graph after removing redundant schema compiler dev declarations. No dependency version changes. Refs: #1817
0436af5 to
0ff037c
Compare
Keep the required Host check at its sole forwarding call site. Remove the one-comparison wrapper, its imports, and its mirrored unit test. Existing tunnel tests cover the transport path. Relates to #1817
Why
Valid IPv6 backend URLs and owned or escaped JSON enum values were rejected. Proxies also removed Connection itself while forwarding fields named by it. Schema-generation tests duplicated configuration through test-only build-script paths instead of checking generated behavior.
Examples
quic://[::1]:4433is a valid direct backend address. Previously, extracting the host as text left IPv6 brackets in the string passed to the IP parser, so admission or dialing rejected it. Both paths now use the same parser and retain the URL parser's typed IPv6 address."http\u0033"means"http3", and an owned JSON value containing"http3"is also valid input. The enums previously required a borrowed string, which those deserialization paths cannot supply. Reading an owned string accepts these representations while preserving validation of supported values.Connection: x-private-hopandX-Private-Hop: internal-valuepreviously lost the Connection header but forwarded X-Private-Hop. The recipient could no longer tell that the field applied only to the previous connection. Forwarding now removes both fields, in both request and response directions, including repeated Connection fields and mixed-case names.What changed
Customer Release Notes
Stargate accepts IPv6 backend addresses and valid JSON transport settings, and correctly removes connection-specific HTTP headers.
Plan Summary
Not applicable.
Usage
Existing registration and proxy interfaces apply.
Testing
The YAGNI follow-up passed all 39 existing tunnel tests and all-target Stargate Clippy with warnings denied in an isolated worktree. It inlines the remaining H3 Host exclusion and removes its one-comparison wrapper and mirrored test. Formatting and whitespace checks passed.
Earlier combined-stack validation passed 1,611 Cargo workspace tests, with 3 existing performance tests ignored, workspace Clippy, and 6 scoped Bazel targets. Regression coverage includes IPv6, owned and escaped JSON, serialization, both header-forwarding directions, and tunnel-specific exclusions. The full workspace and Bazel suites were not rerun for this local simplification. No live-cluster QA is required for this layer.
Notes
Layer 1 of the Stargate maintenance stack. No runtime architecture or wire-schema change.
Issues
Relates to #1817
References
HTTP connection fields
Related Pull Requests
Next layer: #1820. Stack, bottom to top: #1818, #1820, #1823, #1826.
Dependencies
No dependency versions were added or upgraded. Removed duplicate capnpc and tonic-prost-build dev declarations; both remain build dependencies. No license or NOTICE changes.
Summary by CodeRabbit
Connection, while preserving valid repeated headers such asSet-Cookie.